package com.example.hybridmobiledemo.module.main.model.traffic;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.hybridmobiledemo.R;

public class ParkingDetails extends AppCompatActivity {
    private ImageView imageParkingDetail;
    private Button stop1;
    private Button stop2;
    private Button stop3;
    private TextView parkingName;
    private TextView remainStop;
    private TextView fees;
    private TextView backParking;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_parking_details);
        initView();

        backParking.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        stop1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                stop1.setBackground(getDrawable(R.drawable.clr_pressed));
                stop2.setBackground(getDrawable(R.drawable.clr_normal));
                stop3.setBackground(getDrawable(R.drawable.clr_normal));
            }
        });
        stop2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                stop2.setBackground(getDrawable(R.drawable.clr_pressed));
                stop1.setBackground(getDrawable(R.drawable.clr_normal));
                stop3.setBackground(getDrawable(R.drawable.clr_normal));
            }
        });
        stop3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                stop3.setBackground(getDrawable(R.drawable.clr_pressed));
                stop2.setBackground(getDrawable(R.drawable.clr_normal));
                stop1.setBackground(getDrawable(R.drawable.clr_normal));
            }
        });
    }

    private void initView() {
        imageParkingDetail = (ImageView) findViewById(R.id.image_parking_detail);
        stop1 = (Button) findViewById(R.id.stop1);
        stop2 = (Button) findViewById(R.id.stop2);
        stop3 = (Button) findViewById(R.id.stop3);
        parkingName = (TextView) findViewById(R.id.parkingName);
        remainStop = (TextView) findViewById(R.id.remainStop);
        fees = (TextView) findViewById(R.id.fees);
        backParking = (TextView) findViewById(R.id.back_parking_details);
    }
}